<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>搜索结果页</title>
	</head>
	<body>
		<div>您的搜索词是: <span></span></div>
		<script>
			console.log(location.search);
			uri = window.decodeURI(location.search);
			console.log(uri);  //?keyword=手机 
			var params = uri.substring(1);
			console.log(params);
			var arr = params.split('=');
			console.log(arr);  //  ['keyword', '手机']
			var mySpan = document.querySelector('span');
			mySpan.innerHTML = arr[1];
			
		</script>
	</body>
</html>